<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        // class Person {
        //     #height = "199cm"
        //     constructor() {
        //         this.name = "张三"
        //         this.age = 12
        //     }
        // #fnn() {
        //     console.log("啊对对对")
        // console.log(this.#height)
        // }
        // fn() {
        // console.log("what?")
        // console.log(this.#height)
        // this.#fnn()
        // }
        // }
        // let zhangsan = new Person()
        // console.log(zhangsan.name)
        // zhangsan.fn()
        class Person {
            weight = "100kg"
            constructor() {
                this.name = "嘻嘻嘻"
            }
            get age() {
                return 99
            }
            set age(getvalue) {
                console.log("年龄是", getvalue)
            }
            get height() {
                return "180cm"
            }
            set height(getvalue) {
                console.log("身高是", getvalue)
            }
        }
        let zhangsan = new Person()
        zhangsan.height = "200cm"
        console.log(zhangsan.height)
    </script>
</body>

</html>